package com.itany.nmms.util;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/8/1 14:00
 * Version:1.0-SNAPSHOT
 * Description:
 */
public class ParameterUtil {

    public static boolean isNull(String s){
        return null == s || "".equals(s);
    }


    public static String nextValue(String s){
        int i = Integer.parseInt(s)+1;
        String value = "00000"+i;
        return value.substring(value.length()-6);
    }

    public static String escapeString(String s){
        if(!ParameterUtil.isNull(s)){
            char[] cs = s.toCharArray();
            StringBuffer buffer = new StringBuffer();
            for(char c : cs){
                buffer.append("/"+c);
            }
            return buffer.toString();
        }
        return null;
    }
}


